package com.ruoyi.section.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.section.mapper.PostsSectionMapper;
import com.ruoyi.section.domain.PostsSection;
import com.ruoyi.section.service.IPostsSectionService;

/**
 * 社区版块Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-19
 */
@Service
public class PostsSectionServiceImpl implements IPostsSectionService 
{
    @Autowired
    private PostsSectionMapper postsSectionMapper;

    /**
     * 查询社区版块
     * 
     * @param id 社区版块主键
     * @return 社区版块
     */
    @Override
    public PostsSection selectPostsSectionById(Long id)
    {
        return postsSectionMapper.selectPostsSectionById(id);
    }

    /**
     * 查询社区版块列表
     * 
     * @param postsSection 社区版块
     * @return 社区版块
     */
    @Override
    public List<PostsSection> selectPostsSectionList(PostsSection postsSection)
    {
        return postsSectionMapper.selectPostsSectionList(postsSection);
    }

    /**
     * 新增社区版块
     * 
     * @param postsSection 社区版块
     * @return 结果
     */
    @Override
    public int insertPostsSection(PostsSection postsSection)
    {
        return postsSectionMapper.insertPostsSection(postsSection);
    }

    /**
     * 修改社区版块
     * 
     * @param postsSection 社区版块
     * @return 结果
     */
    @Override
    public int updatePostsSection(PostsSection postsSection)
    {
        return postsSectionMapper.updatePostsSection(postsSection);
    }

    /**
     * 批量删除社区版块
     * 
     * @param ids 需要删除的社区版块主键
     * @return 结果
     */
    @Override
    public int deletePostsSectionByIds(Long[] ids)
    {
        return postsSectionMapper.deletePostsSectionByIds(ids);
    }

    /**
     * 删除社区版块信息
     * 
     * @param id 社区版块主键
     * @return 结果
     */
    @Override
    public int deletePostsSectionById(Long id)
    {
        return postsSectionMapper.deletePostsSectionById(id);
    }
}
